<div id="page">
	<div id="title" class="textile">
		<h1>
			<%= @page.title %>
		</h1>
		<hr />
	</div>
	
	<div id="page_content" class="textile">
		<%= @revision.content.wikify %>
	</div>
	
	<div id="comments">
		<hr class="separator" />
		<h2>Comments</h2>
		
		<% unless params[:show_add_comment] %>
			<div id="link_comment">
				<%= link_to_function 'Add Comment', 'commentManager.show()', :href => url_for(:show_add_comment => 1)%>
			</div>
		<% end %>
		
		<div id="add_comment" <%= 'style="display:none"' unless params[:show_add_comment] %>>
			<% remote_form_for [@page, Comment.new] do |f| %>
				<%= hidden_field_tag :revision_id, @revision.id %>
				<%= f.text_area :comment, :cols => 50, :rows => 6 %><br />
				<%= f.submit 'Add Comment' %>
				<%= submit_tag 'Cancel', :onclick => "commentManager.hide(); return false;" %>
			<% end %>
		</div>
		
		<div id="all_comments">
			<%= render :partial => @page.comments %>
		</div>
	</div>
</div>